package com.zch.rpc.client.client;

import com.zch.rpc.client.common.entity.Person;
import com.zch.rpc.client.interfaces.PersonService;
/**
 * 不经过zookeeper服务注册跟发现的案例
 */
public class ClientProvider {
    public static void main(String[] args) {
        RpcClientProxy proxy = new RpcClientProxy("127.0.0.1",9998);
        //获取动态的代理对象。
        PersonService service = proxy.getProxy(PersonService.class);

        System.out.println(service.getInfo());

        Person person = new Person();
        person.setAge(23);
        person.setName("Qjm");
        person.setSex("男");
        System.out.println(service.printInfo(person));
    }
}
